package com.example.demo.controller;

import com.example.demo.entity.econ.AreaData;
import com.example.demo.entity.econ.MapData;
import com.example.demo.service.EconService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class EconController {

    @Autowired
    private EconService econService;

    @GetMapping("/cityMap")
    private List<MapData> getCityMap() {
        return econService.getCityMap();
    }

    @GetMapping("/countryMap")
    private List<MapData> getCountryMap() {
        return econService.getCountryMap();
    }

    @GetMapping("/xiBei")
    private List<AreaData> xiBei() {
        return econService.xiBei();
    }

    @GetMapping("/dongBei")
    private List<AreaData> dongBei() {
        return econService.dongBei();
    }

    @GetMapping("/huaBei")
    private List<AreaData> huaBei() {
        return econService.huaBei();
    }

    @GetMapping("/huaDong")
    private List<AreaData> huaDong() {
        return econService.huaDong();
    }

    @GetMapping("/zhongNan")
    private List<AreaData> zhongNan() {
        return econService.zhongNan();
    }

    @GetMapping("/xiNan")
    private List<AreaData> xiNan() {
        return econService.xiNan();
    }
}
